/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package database;

import com.mongodb.BasicDBObject;
import com.mongodb.DB;
import com.mongodb.DBCollection;
import com.mongodb.DBObject;
import java.util.HashMap;
import object.MTObjectProperty;
import org.quartz.Job;
import org.quartz.JobDataMap;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

/**
 *
 * @author daolam
 */
public class MTJobLoadData implements Job{
    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        JobDataMap data = context.getJobDetail().getJobDataMap();
        DB dbHandler = (DB)data.get("DBHANDLER");
        String theCollectionName = (String)data.get("COLLECTIONAME");
        DBCollection collection = dbHandler.getCollection(theCollectionName);
        Long guid = (Long)data.get("GUID");
        BasicDBObject query = new BasicDBObject(String.valueOf(MTObjectProperty.guid), guid);
        DBObject dbObject = collection.findOne(query);
    }
}
